# the minimum version of CMake.
cmake_minimum_required(VERSION 3.13.0)
project(logan)

# 设置Clogan库路径
set(CLOGAN_DIR ../../../../logan/Logan/Clogan)

# 添加Clogan子目录
add_subdirectory(${CLOGAN_DIR} clogan.out)

# 包含Clogan头文件目录
include_directories(${CLOGAN_DIR})

# 链接目录
link_directories(clogan.out)

set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})

include_directories(${NATIVERENDER_ROOT_PATH})

add_library(logan SHARED
            ${NATIVERENDER_ROOT_PATH}/napi_init.cpp
            ${NATIVERENDER_ROOT_PATH}/logan_queue.cpp)

# 链接所有需要的库
target_link_libraries(logan
                      PUBLIC libace_napi.z.so
                      PUBLIC clogan)
